export default {
  namespace: 'busiComponent',
  state: {
    selectBusiComponent: {}, // 业务组件列表选中数据
    busiComponentAddVisibleFlag: false, // 业务组件新增弹窗展示/隐藏标记
    busiComponentAddType: null, // 业务组件新增类型： add，modify
    selectBusiElement: {}, // 组件元素列表选中数据
    busiElementAddVisibleFlag: false, // 组件元素新增弹窗展示/隐藏标记
    selectBusiObjAdd: {}, // 业务组件新增时选中业务对象
    busiElementAddList: [], // 组件元素数据列表
    busiElementAddType: null // 业务组件元素新增类型： edit
  },

  effects: {},

  reducers: {
    saveSelectBusiComponent(state, { payload: params }) {
      return {
        ...state,
        selectBusiComponent: params,
      };
    },
    saveBusiComponentAddVisibleFlag(state, { payload: params }) {
      return {
        ...state,
        busiComponentAddVisibleFlag: params,
      };
    },
    saveBusiComponentAddType(state, { payload: params }) {
      return {
        ...state,
        busiComponentAddType: params,
      };
    },
    saveSelectBusiElement(state, { payload: params }) {
      return {
        ...state,
        selectBusiElement: params,
      };
    },
    saveBusiElementAddVisibleFlag(state, { payload: params }) {
      return {
        ...state,
        busiElementAddVisibleFlag: params,
      };
    },
    saveSelectBusiObjAdd(state, { payload: params }) {
      return {
        ...state,
        selectBusiObjAdd: params,
      };
    },
    saveBusiElementAddList(state, { payload: params }) {
      return {
        ...state,
        busiElementAddList: params,
      };
    },
    saveBusiElementAddType(state, { payload: params }) {
      return {
        ...state,
        busiElementAddType: params,
      };
    },
  },
};
